'''
      一键自动部署
      请替换列表中的脚本名称
'''

import runpy
import time
from tqdm import tqdm
import subprocess

DEV_ENV = True
time_start = time.time()
path = '/Users/code/Git/yo-python/maintenance/deploy-scrupt-frontdev'

# 使用tqdm显示进度条
for script in tqdm([
    'stand-prod.py',
    'deploy-dev.py',
    'deploy-prod.py'],
        desc=f"Waiting after"):
    runpy.run_path(f"{path}/{script}")
    # 假设每个脚本运行后我们等待10秒

time_end = time.time()

print('\nAll Servers are deployed.\nPlease check the server status.\n')
print('Time: ',
      round(time_end - time_start),
      's'
      )
